@charset "utf-8";
@import "config";

html {
    font-size: 12px;
}

///********************************全局设置********************************/

a,
body {
    color: gray();
}

///********************************顶层容器********************************/

.container {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
}

///********************************顶栏********************************/

.topbar {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    font-size: 0.8rem;
    height: setLengthByHeight(89px);
    line-height: setLengthByHeight(88px);
    background-color: #f7f7f7;
    border-bottom: 1px solid #c1c1c1;

    div {
        position: absolute;
        top: 0;
        white-space: nowrap;
        overflow: hidden;
    }

    .left,
    .right {
        width: 4rem;

        a {
            padding: 0 0.5rem;
        }

        .iconfont {
            font-size: 1rem;
        }
    }

    .left {
        left: 0;
        text-align: left;

        a {
            float: left;
        }
    }

    .right {
        right: 0;
        text-align: right;

        a {
            float: right;
        }

        .iconfont {
            color: lightgray();
        }
    }

    .title {
        left: 4.5rem;
        right: 4.5rem;
        text-align: center;
        text-overflow: ellipsis;
    }
}

///********************************内容区域********************************/

.main {
    position: absolute;
    left: 0;
    right: 0;
    top: setLengthByHeight(89px);
    bottom: setLengthByHeight(101px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background-color: #f3f4f6;
}

.main.full {
    bottom: 0;
}

//.newframe {
//  position: fixed;
//  left: 0;
//  right: 0;
//  top: 0;
//  bottom: 0;
//  width: 100%;
//  height: 100%;
//  border: none;
//  -webkit-transform: translate3d(100%, 0, 0);
//  transform: translate3d(100%, 0, 0);
//  background-color: #ffffff;
//}
//.newframe.show {
//  -webkit-transform: translate3d(0, 0, 0);
//  transform: translate3d(0, 0, 0);
//}

///********************************底栏********************************/

.btmbar {
    font-size: 0;
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: #fefefe;
    height: setLengthByHeight(101px);
    line-height: setLengthByHeight(99px);
    border-top: 1px solid #c1c1c1;
    white-space: nowrap;

    .item {
        display: inline-block;
        vertical-align: middle;
        width: 25%;
        text-align: center;
        line-height: normal;

        .iconfont {
            display: inline-block;
            font-size: 1.3rem;
            line-height: 1em;
            position: relative;

            em {
                position: absolute;
                right: -0.7em;
                top: -0.2em;
                font-size: 0.55rem;
                min-width: 1.5em;
                max-width: 2.8em;
                height: 1.5em;
                line-height: 1.5em;
                background-color: themeColor();
                color: #ffffff;
                border-radius: 0.75em;
                padding: 0 0.4em;
                overflow: hidden;
                text-overflow: ellipsis;
            }
        }

        p {
            font-size: 0.55rem;
            line-height: 1.2em;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            padding: 0 0.5em;
        }
    }

    .item.active {
        .iconfont {
            color: themeColor();
        }
    }
}

///********************************弹出层********************************/

//弹出层
.layer {
    visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-transition: visibility 1000ms ease, background-color 1000ms ease;
    transition: visibility 1000ms ease, background-color 1000ms ease;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 999;

    //会话框（位于屏幕下方位置）
    .dialog {
        visibility: hidden;
        opacity: 0.5;
        -webkit-transform: translate3d(0, 100%, 0);
        transform: translate3d(0, 100%, 0);
        -webkit-transition: visibility 300ms ease, opacity 300ms ease;
        transition: visibility 300ms ease, opacity 300ms ease;
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ffffff;
        text-align: center;
        -webkit-tap-highlight-color: lightgray(0.3);

        //icon列表
        .icon_list {
            font-size: 0;
            width: 90%;
            margin: setLengthByHeight(20px) auto;

            .item {
                display: inline-block;
                width: 33.33333333333333%;
                padding: setLengthByHeight(20px);

                .iconfont {
                    display: block;
                    font-size: 1.8rem;
                    line-height: 1em;
                    width: 3rem;
                    height: 3rem;
                    line-height: 3rem;
                    border-radius: 50%;
                    color: #ffffff;
                    background-color: lightgray();
                    margin: auto;
                    overflow: hidden;
                }

                p {
                    color: lightgray();
                    font-size: 0.6rem;
                    margin-top: setLengthByHeight(16px);
                }
            }
        }

        //文本列表
        .text_list {
            .item {
                font-size: 0.8rem;
                display: block;
                height: setLengthByHeight(110px);
                line-height: setLengthByHeight(108px);
                border-bottom: 1px solid #e0e0e0;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                padding: 0 0.5rem;
            }

            .item.em {
                color: #d62d31;
            }

            ~ .cancel {
                position: relative;
                height: setLengthByHeight(114px);
                padding-top: setLengthByHeight(16px);
                border-top: none;

                &::before {
                    content: "";
                    display: block;
                    position: absolute;
                    top: 0;
                    left: 0;
                    right: 0;
                    height: setLengthByHeight(16px);
                    background-color: #e8e9eb;
                    border-bottom: 1px solid #e0e0e0;
                }
            }
        }

        //取消
        .cancel {
            display: block;
            height: setLengthByHeight(100px);
            line-height: setLengthByHeight(98px);
            border-top: 1px solid #e0e0e0;
            padding: 0 0.5rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-size: 0.9rem;
        }
    }

    .dialog.confirm {
        opacity: 0;
        -webkit-transform: translate3d(0, -50%, 0) scale(0.8);
        transform: translate3d(0, -50%, 0) scale(0.8);
        -webkit-transition: visibility 150ms ease, opacity 150ms ease, -webkit-transform 150ms ease, transform 150ms ease;
        transition: visibility 150ms ease, opacity 150ms ease, -webkit-transform 150ms ease, transform 150ms ease;
        top: 50%;
        left: setLengthByHeight(50px);
        right: setLengthByHeight(50px);
        bottom: auto;
        border-radius: setLengthByHeight(20px);
        padding: setLengthByHeight(30px) setLengthByHeight(20px);
        background-color: #f8f8f8;

        .title {
            font-size: 1rem;
            line-height: 1em;
        }
        
        .title.em {
            color: themeColor();
            margin-top: setLengthByHeight(20px);
        }

        .inner {
            font-size: 0.6rem;
            padding: setLengthByHeight(20px) 0;
            color: gray(0.8);

            .ol {
                padding: 0 0.2rem 0 1.2rem;
                list-style: decimal;

                li {
                    margin: setLengthByHeight(20px) 0;
                }
            }
        }

        .inner.left {
            text-align: left;
        }

        .actions {
            font-size: 0;
            border-top: 1px solid #dcdcdc;
            padding-top: setLengthByHeight(30px);

            .btn {
                font-size: 0.7rem;
                width: 46%;
                &:first-child {
                    color: gray(0.8);
                }
                &:nth-child(2n) {
                    margin-left: 5%;
                }
            }
        }

        .actions.alone {
            .btn {
                width: 97%;
            }
        }
    }
}

//显示————弹出层
.layer.show {
    visibility: visible;
    background-color: rgba(0, 0, 0, 0.65);

    //显示————会话框（位于屏幕下方位置）
    .dialog.show {
        -webkit-transition: visibility 300ms ease, opacity 300ms ease, -webkit-transform 300ms ease, transform 300ms ease;
        transition: visibility 300ms ease, opacity 300ms ease, -webkit-transform 300ms ease, transform 300ms ease;
        visibility: visible;
        opacity: 1;
        -webkit-transform: none;
        transform: none;
    }

    .dialog.confirm.show {
        -webkit-transform: translate3d(0, -50%, 0) scale(1);
        transform: translate3d(0, -50%, 0) scale(1);
    }
}

.tip {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate3d(-50%, -50%, 0) scale(0.8);
    transform: translate3d(-50%, -50%, 0) scale(0.8);
    text-align: center;
    background-color: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: setLengthByHeight(32px);
    border-radius: setLengthByHeight(20px);
    min-width: setLengthByHeight(250px);
    min-height: setLengthByHeight(184px);
    visibility: hidden;
    opacity: 0;
    -webkit-transition: visibility 150ms ease, opacity 150ms ease, -webkit-transform 150ms ease, transform 150ms ease;
    transition: visibility 150ms ease, opacity 150ms ease, -webkit-transform 150ms ease, transform 150ms ease;

    i {
        font-size: 2rem;
    }

    p {
        font-size: 0.8rem;
    }
}

.tip.show {
    visibility: visible;
    opacity: 1;
    -webkit-transform: translate3d(-50%, -50%, 0) scale(1);
    transform: translate3d(-50%, -50%, 0) scale(1);
}

///*******************************按钮类*****************************/

///*
// * 按钮类命名规则：
// * 1. 控制颜色的类直接使用颜色的英文
// * 2. 控制宽度的类使用 w_数字 表示
// * 3. 控制高度的类使用 h_数字 表示
// * 4. 控制圆角的类使用 r_数字 表示
// * 5. 控制无padding使用 nopd 表示
// * */

.btn {
    font-size: 0.8rem;
    display: inline-block;
    vertical-align: middle;
    text-align: center;
    border: 1px solid themeColor();
    border-radius: setLengthByHeight(8px);
    background-color: themeColor();
    color: #ffffff;
    height: setLengthByHeight(64px);
    line-height: setLengthByHeight(62px);
    padding: 0 0.5em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    @include highLight();
    -webkit-appearance: none;
    appearance: none;
}

.btn.white {
    border: 1px solid #e3e3e3;
    background-color: #ffffff;
    color: themeColor();
}

.btn.lightgray {
    background-color: #f3f4f6;
    border: 1px solid #c1c1c1;
    color: gray();
}

.btn.w_210 {
    width: setLengthByHeight(210px);
}

.btn.h_70 {
    height: setLengthByHeight(70px);
    line-height: setLengthByHeight(68px);
}

.btn.h_80 {
    height: setLengthByHeight(80px);
    line-height: setLengthByHeight(78px);
}

.btn.h_210 {
    height: setLengthByHeight(210px);
    line-height: setLengthByHeight(208px);
}

.btn.r_30 {
    border-radius: setLengthByHeight(30px);
}

.btn.nopd {
    padding: 0;
}

///********************************内容块********************************/

.piece {
    background-color: #ffffff;
    margin: setLengthByHeight(32px) 0;
    border-bottom: 1px solid #e3e3e3;
    border-top: 1px solid #e3e3e3;
    @include highLight();

    .text_red {
        color: themeColor() !important;
    }

    .text_green {
        color: #0bba07 !important;
    }

    > .item,
    a.link {
        font-size: 0.75rem;
        display: block;
        position: relative;
        line-height: setLengthByHeight(88px);
        color: lightgray();
        &:not(:last-child) {
            border-bottom: 1px solid #e3e3e3;
        }

        > * {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        p {
            padding-left: 0.5rem;
            color: gray();
        }

        i {
            position: absolute;
            bottom: 0;
            text-align: right;
            right: 0;
            padding-right: 0.5rem;
            font-size: 0.8rem;
            width: setLengthByHeight(64px);
        }
    }

    //链接
    a.link {
        p {
            padding-right: setLengthByHeight(264px) + 1rem;
        }

        span {
            position: absolute;
            bottom: 0;
            right: setLengthByHeight(64px);
            width: setLengthByHeight(200px);
            text-align: right;
        }
    }

    //链接（内容突出）
    a.link.emphasize {
        padding: 0.5rem 0;

        p {
            &:first-of-type {
                padding-right: 0.5rem;
            }
            &:last-of-type {
                color: lightgray();

                em {
                    font-size: 1.2rem;
                    font-weight: bold;
                    color: gray();
                }
            }
        }

        span {
            bottom: 0.5rem;
        }

        i {
            bottom: 0.5rem;
        }
    }

    > .item {
        display: block;
        -webkit-tap-highlight-color: transparent;

        p {
            width: 4.5rem;
        }

        .input_data,
        span,
        strong {
            position: absolute;
            top: 0;
            left: 5.5rem;
            right: 1rem;
        }

        i {
            ~ .input_data,
            ~ span,
            ~ strong {
                right: setLengthByHeight(64px);
            }
        }

        input,
        strong {
            color: gray(0.66);
        }

        span {
            text-align: right;
        }

        .input_data {
            input {
                width: 100%;
                font-size: 0.75rem;
                background-color: transparent;
                border: none;
                -webkit-appearance: none;
                appearance: none;
                &::-webkit-input-placeholder {
                    color: lightgray(0.5);
                }
            }
        }

        .strong {
            font-size: 1rem;
            color: gray();
        }
    }

    > .item.phone {
        .input_data {
            right: setLengthByHeight(64px) + 0.75rem * 5;
        }

        a {
            position: absolute;
            top: 0;
            right: setLengthByHeight(64px) - 1rem;
            padding: 0 0.5rem;
            color: #153fc6;
            @include highLight();
        }
    }

    > .item.merge {
        border-bottom: none;
        line-height: 1rem;
        margin: 0.8rem 0;
    }

    > .item.merge.bottom_line {
        border-bottom: 1px solid #e3e3e3;
        padding-bottom: 0.8rem;
    }

    .text {
        color: lightgray();

        em {
            color: gray();
        }
    }

    ol.text {
        padding: 0 1rem 0 2rem;
        list-style: decimal;
        font-size: 0.65rem;

        overflow: hidden;

        li {
            margin: 1.2rem 0;
        }
    }

    div.text {
        font-size: 0.75rem;
        padding: 0 0.5rem;

        p {
            margin: setLengthByHeight(20px) 0;
            line-height: 1.3rem;
        }
    }
}

//内容块（无顶部外间距）
.piece.no_mtop {
    margin-top: 0;
    border-top: none;
}

//内容块（带左侧内间距）
.piece.p_left {
    padding-left: 0.5rem;
}

//内容块（仅包含上下外间距，无其它样式）
.piece.empty {
    background-color: transparent;
    border: none;

    //说明信息
    .explain {
        font-size: 0.6rem;
        padding-left: 1rem;
        padding-right: 0.5rem;

        .item {
            position: relative;
            overflow: hidden;
            padding-left: 0.5rem;
            line-height: 1rem;

            &::before {
                content: "·";
                position: absolute;
                left: 0;
            }

            > * {
                transform: scale(0.88);
                transform-origin: left;
            }

            p {
                white-space: nowrap;
                color: lightgray();
            }

            > a {
                float: left;
            }

            a {
                color: #153fc6;
            }
        }
    }
}

.piece.action {
    background-color: transparent;
    border: none;
    padding: 0 1.2rem;
    @include highLight();

    .btn {
        display: block;
        width: 100%;
    }
}

.piece.list {
    background-color: transparent;
    margin: 0;
    border: none;
    min-height: 100%;

    .link {
        background-color: #ffffff;
        color: gray();
        line-height: 1.3rem;
        padding: 0.3rem 0;
        border-top: none !important;
        border-bottom: 1px solid #e3e3e3;

        small {
            display: block;
            color: lightgray();
            padding-left: 0.5rem;
            padding-right: 0.5rem;
            font-size: 0.6rem;
        }

        span {
            bottom: auto;
            top: 0.3rem;
            right: 0.5rem;
            width: setLengthByHeight(240px);
        }

        i {
            font-style: normal;
            right: 0.5rem;
            width: setLengthByHeight(240px);
            bottom: 0.3rem;
            padding: 0;
            font-size: 0.6rem;
            color: lightgray();
        }
    }

    .empty {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        background-color: #ffffff;
        text-align: center;
        color: lightgray();
        padding-top: setLengthByHeight(234px);
        &:last-child {
            background-color: transparent;

            img {
                display: inline;
            }

            p {
                display: block;
            }
        }

        img {
            display: none;
            width: setLengthByHeight(114px);
        }

        p {
            display: none;
            font-size: 0.7rem;
            line-height: 2rem;
        }
    }
}

.tab_nav {
    background-color: #ffffff;
    height: setLengthByHeight(80px);
    line-height: setLengthByHeight(78px);
    border-bottom: 1px solid #e3e3e3;
    overflow: hidden;
    font-size: 0;
    white-space: nowrap;
    text-align: center;
    position: fixed;
    left: 0;
    right: 0;
    z-index: 1;

    .item {
        display: inline-block;
        font-size: 0.8rem;
        color: gray(0.8);
        transition: color 300ms ease;
    }

    .item.active {
        color: themeColor();
    }

    .line {
        position: absolute;
        bottom: 0;
        height: setLengthByHeight(4px);
        background-color: themeColor();
        padding: 0 0.5rem;
        background-clip: content-box;
        transition: -webkit-transform 300ms ease, transform 300ms ease;
    }
}

.tab_nav.nav_3 {
    .item,
    .line {
        width: 33.33333333333333%;
    }
}

.tab_frame {
    padding-top: setLengthByHeight(80px);
    height: 100%;
    width: 100%;
    white-space: nowrap;
    font-size: 0;
    transition: -webkit-transform 300ms ease, transform 300ms ease;

    .item {
        display: inline-block;
        vertical-align: top;
        width: 100%;
        position: relative;
    }
}

///*******************************以高度适配*****************************/

@media screen and (min-height: 416px) {
    html {
        font-size: setRootByHeight(416px);
    }
}

@media screen and (min-height: 460px) {
    html {
        font-size: setRootByHeight(460px);
    }
}

@media screen and (min-height: 504px) {
    html {
        font-size: setRootByHeight(504px);
    }
}

@media screen and (min-height: 513px) {
    html {
        font-size: setRootByHeight(513px);
    }
}

@media screen and (min-height: 518px) {
    html {
        font-size: setRootByHeight(518px);
    }
}

@media screen and (min-height: 520px) {
    html {
        font-size: setRootByHeight(520px);
    }
}

@media screen and (min-height: 547px) {
    html {
        font-size: setRootByHeight(547px);
    }
}

@media screen and (min-height: 559px) {
    html {
        font-size: setRootByHeight(559px);
    }
}

@media screen and (min-height: 567px) {
    html {
        font-size: setRootByHeight(567px);
    }
}

@media screen and (min-height: 569px) {
    html {
        font-size: setRootByHeight(569px);
    }
}

@media screen and (min-height: 570px) {
    html {
        font-size: setRootByHeight(570px);
    }
}

@media screen and (min-height: 572px) {
    html {
        font-size: setRootByHeight(572px);
    }
}

@media screen and (min-height: 603px) {
    html {
        font-size: setRootByHeight(603px);
    }
}

@media screen and (min-height: 672px) {
    html {
        font-size: setRootByHeight(672px);
    }
}

///*******************************以宽度适配*****************************/
//
//@media screen and (min-width: 320px) {
//  html {
//      font-size: setRootByWidth(320px);
//  }
//}
//
//@media screen and (min-width: 360px) {
//  html {
//      font-size: setRootByWidth(360px);
//  }
//}
//
//@media screen and (min-width: 375px) {
//  html {
//      font-size: setRootByWidth(375px);
//  }
//}
//
//@media screen and (min-width: 414px) {
//  html {
//      font-size: setRootByWidth(414px);
//  }
//}
